package com.lhd.usermanagement.common;

import lombok.Getter;

@Getter
public enum ErrorCode {
    OPTION_SUCCESS(0, "ok",""),
    PARAMS_ERROR(40000, "请求参数错误",""),
    NULL_ERROR(40001, "请求数据为空",""),
    USER_ACCOUNT_EXIST(40002, "用户账号已存在",""),
    USER_ACCOUNT_NOT_EXIST(40003, "用户不存在",""),
    PLANET_CODE_EXIST(40004, "星球账号已存在",""),
    NOT_LOGIN(40100, "未登录",""),
    NO_AUTH(40101, "无权限",""),
    SYSTEM_ERROR(50000, "系统内部异常",""),
    OPERATION_ERROR(50001, "操作失败",""),
    SERVICES_INCOMPATIBLE(50002,"不支持的媒体类型",null);

    /**
     * 状态码
     */
    private final int code;
    /**
     * 状态码信息
     */
    private final String message;
    /**
     * 状态码具体描述
     */
    private final String description;


    ErrorCode(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }

}
